#include <stdio.h>
#include <stdint.h>
#include <netinet/tcp.h>
#include "packet.h"

#define s(_) \
    _(base)(int, hh, -)\
    _(base)(int, jj, -)\
    _(base)(int, kk, -)

PACKET(s)

#define hdr(_) \
    _(bit)(int, bita, 4) \
    _(bit)(int, bitb, 4) \
    _(bit)(int, bitc, 28)\
    _(bit)(int, bitd, 4)

#define sub(_) \
    _(base)(int, hh, -)\
    _(base)(int, jj, -)\
    _(base)(int, kk, -)

#define hello(_) \
    _(base)(int,   a, -) \
    _(base)(short, b, -) \
    _(bits)(struct,hdr, -) \
    _(packet)(struct sub, sub, -) \
    _(base)(struct s*, ha, -) \
    _(array)(int,  c, 12)

PACKET(hello)


int main(void)
{
    struct hello hello;
    //define_printf(&hello_desc);
    //define_printf(&s_desc);
    packet_set_by_name(&hello_desc, (void*)&hello, "a",3,"b",4, NULL);
}
#undef hdr
#undef hello


